package com.yr.ryjk.consult.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;

import com.yr.ryjk.consult.entity.ConsultReply;

public interface ConsultReplyMapper {
	void insert(ConsultReply consultReply);
	
	@Select("select * from consult_reply where con_id=#{2} order by answer_time desc limit #{0},#{1}")
	@ResultMap("BaseResultMap")
	List<ConsultReply> selectByConsultId(int start, int pageSize, String id);

	@Select("select count(1) from consult_reply where con_id=#{0}")
	@ResultType(Integer.class)
	int selectCount(String id);
	
	@Delete("DELETE from consult_reply where con_id=#{0}")
	void deleteConsultReplyById(String id); 
}
